<?php
	session_start();

	require('defines.php');
	require('conn.php');
?>
<html>
<head>
<link href="<?php echo $sitedir.'estilo.css'; ?>" rel="Stylesheet" Type="text/css" />
<script type="text/javascript">
	try{
		xmlhttp = new XMLHttpRequest();
	}catch(ee){
		try{
			xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
		}catch(e){
			try{
				xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
			}catch(E){
				xmlhttp = false;
			}
		}
	}
	
	function carregaMenu(){
		xmlhttp.open("GET", '<?php echo $sitedir.'menu.php'; ?>', true);
		xmlhttp.onreadystatechange = function() {
			if (xmlhttp.readyState == 4){
				document.getElementById("divMenu").innerHTML = xmlhttp.responseText;
			}
		}
		xmlhttp.send(null);
	}
</script>
<title> EViagem! </title>
</head>
<body onLoad="carregaMenu()">
<div class="divPage">
	<div class="divTopo"></div>
	<div class="divMenu" id="divMenu">
		<div class="menuTitle">Menu</div>
		<p class="load">Carregando Op&ccedil;oes...</p>
	</div>
	<div class="divMsg"><?php echo $_REQUEST['msg']; ?></div>
	<div class="divCorpo">
<?php
	$page = isset($_REQUEST['page'])? $_REQUEST['page']: 'index';
	include("$localdir/html/$page.php");  
?>
	</div>
	<div class="divRodape">Grupo 6 - Projeto e Desenvolvimento de Software - UFRPE - UFRPE</div>
</div>
</body>
</html>